package top.easyblog.core.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author: frank.huang
 * @date: 2023-12-18 23:42
 */
@Getter
@Configuration
public class CustomConfiguration {


    @Value("${custom.compress-code.auto-generate.enable:false}")
    private boolean compressCodeBatchEnable;

    @Value("${custom.compress-code.auto-generate.num:100000}")
    private int compressCodeBatchGenNum;

    @Value("${custom.compress-code.auto-generate.threshold:10000000}")
    private int compressCodeDBThreshold;

    @Value("${custom.compress-code.snowflake-worker-id:1}")
    private long snowflakeWorkerId;

    @Value("${custom.compress-code.snowflake-date-center-id:1}")
    private long snowflakeDateCenterId;

    @Value("${custom.compress-code.queue.key:compression-code-queue}")
    private String compressionCodeQueueKey;

    @Value("${custom.compress-code.queue.size:10000000}")
    private int compressionCodeQueueSize;

    @Value("${custom.shorklink.default-domain:localhost:8001}")
    private String defaultLinkDomain;

    @Value("${custom.shorklink.bloom-filter.key:shortlink-bf}")
    private String defaultBFKey;

    @Value("${custom.shorklink.bloom-filter.capacity:100000000}")
    private long defaultBFCapacity;

    @Value("${custom.shorklink.bloom-filter.error-rate:0.0001}")
    private double defaultBFErrorRate;
}
